<?php

/**

 * Date: 2015/7/13

 */
class Controller
{
    private $applicationHelper;
    public $conf;

    private function __construct()
    {
    }

    static function run()
    {
        $instance = new Controller();
        $instance->int();
    }

    function int()
    {
        //$this->applicationHelper = ApplicationHelper::instance();
        //$this->applicationHelper->int();
       // $this->applicationHelper->conf();
//var_dump($this->applicationHelper->conf()->get_config());
        //echo 3;
       // $this->conf="xxxxxxxxxxconfi";
       // $this->loader();
        //$appConfig=ApplicationHelper::instance('appConfig','getConfig');
        $c = ucwords((Req::request('c')? : 'index'). 'Action');
        $a = Req::get('a')?Req::get('a'):(Req::post('a')?Req::post('a'):'index');
        $app = new $c();
        $app->$a();
    }

    function loader(){






    }
    function handleRequest()
    {
        //$request=new \core\controller\Request();
    }


}